#include "add.h"

int Add::add(int x, int y)
{
	return 0;
}

#include <unordered_map>
class Solution {
public:
    int MoreThanHalfNum_Solution(vector<int>& numbers) {
        unordered_map<int, int> hx;
        int n = 0;
        for (int i = 0; i < numbers.size(); i++)
        {
            hx[numbers[i]]++;
            if (hx[numbers[i]] > (numbers.size() / 2))
            {
                n = numbers[i];
                break;
            }
        }

        return n;
    }
};

